// 前台 发现模块 的axios封装 发请求

import myaxios from './MyAxios.js'

// 服务器地址
const baseUrl = "http://43.136.172.73/api/v1/"

const ShoppingApi = {
	// 查询全部订单
	allOrderList() {
		let url = baseUrl + 'order/list';
		return myaxios.get(url);
	},
	// 查询已完成订单
	completeOrderList() {
		let url = baseUrl + '/order/complete';
		return myaxios.post(url);
	},

	// 生成订单
	createOrder() {
		let url = baseUrl + '/order/create';
		return myaxios.post(url);
	},

	// 待支付订单
	awaitOrder(){
		let url=baseUrl+'/order/pay';
		return myaxios.post(url)
	},
	
	// 配送订单
	cancelOrder(){
		let url=baseUrl+'/order/transport';
		return myaxios.post(url)
	}
}

export default ShoppingApi;